<template>
  <a-modal :title="title"
           :width="1200"
           :visible="listModalVisible"
           @ok="handleCancel"
           @cancel="listModalVisible=false"
           cancelText="关闭"
  >
    <a-card :bordered="false">
      <!-- table区域 -->
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="list"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">
      </a-table>
    </a-card>
  </a-modal>
</template>

<script>
import { getAction } from '@api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { mixinDevice } from '@/utils/mixin'

export default {
name: "OrderIndexModal",

  mixins:[JeecgListMixin, mixinDevice],

  data () {
    return {
      description: 'order_id管理页面',
      title:"详情",
      listModalVisible:false,
      labelCol: {
        xs: { span: 8 },
        sm: { span: 8 },
      },
      wrapperCol: {
        xs: { span: 20 },
        sm: { span: 16 },
      },
      list:{},
      columns: [
        {
          title:'订单编号',
          align:"center",
          dataIndex: 'id'
        },
        {
          title:'订单内容',
          align:"center",
          dataIndex: 'content'
        },
        {
          title:'创建时间',
          align:"center",
          dataIndex: 'createTime'
        },
      ],
      url: {
        list:"/orderInfoLog/orderInfoLog/getOrderInfoLog",
      },

    }
  },
  created() {
    this.showOrderIndex();
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    },
  },




  methods: {
    initDictConfig(){
    },
    showOrderIndex(record){

      let param = {};

      param.order_info_id = record.id;

      getAction(this.url.list,param).then(res=>{
        this.list = res.result;
      })
      this.listModalVisible = true;
    },
    handleCancel(){
      this.listModalVisible = false;
    },


  }


}
</script>

<style scoped>
@import '~@assets/less/common.less';
</style>